function onLogout() {
  $.ajax({
    url: '/logout',
    type: 'get',
    success: function(data,status){
      if(status == 'success'){
        /*console.log(data);*/
      }
    },
    error: function(data,err){
      console.log(data);
    }
  });
}

function onCheck(){
  var snum = document.getElementById('getsnum').value;
  hit_load(snum);
  document.getElementById('bingo').style.top = '80px';
}

function table_load() {
  console.log('table load');
  $.ajax({
    url: '/realtime',
    type: 'get',
    success: function(data,status){
      if(status == 'success'){
        console.log(data);
        init_all_table();
        updateTable(data);
        $('.td1').on("click",function(){
          console.log($(this).text());
          /*console.log($(this).offset());*/
          hit_load($(this).text());
          document.getElementById('bingo').style.top = $(this).offset().top+'px';
        })
      }
    },
    error: function(data,err){
      console.log(data);
    }
  });
}

function hit_load(sname){
  $.ajax({
    url: '/hit?snum='+sname,
    type: 'get',
    success: function(data,status){
      if(status == 'success'){
        console.log(data);
        lines = data.split('\n');
        var str = '';
        for(var i in lines){
          items = lines[i].split(',')
          str+='<tr>'
          for(var j in items){
            if(j>0){
              str+='<td>'+items[j]+'</td>'
            }
          }
          str+='</tr>'
        }
        $('#hit-table').html('<tr><td>日期</td><td>模型</td><td>收益1</td><td>收益2</td><td>收益3</td><td>收益4</td><td>收益5</td></tr>');
        $('#hit-table').append(str);
        $('#hit-name').html(sname);
        document.getElementById('bingo').style.display = 'block';
      }
    },
    error: function(data,err){
      console.log(data);
    }
  });
}
function res_load(sname){
  $.ajax({
    url: '/res?name='+sname,
    type: 'get',
    success: function(data,status){
      if(status == 'success'){
        /*console.log(data);*/
        test(data);
      }
    },
    error: function(data,err){
      console.log(data);
    }
  });
}

function draw_bene_freq(){
  // 基于准备好的dom，初始化echarts实例
  var myChart = echarts.init(document.getElementById('chart0'));
  var slist = [];
  /*slist = data.split('\n');*/
  var date_list = [];
  var today = new Date();
  for(var y=2012;y < 1900 + today.getYear();y++){
    for(var m=1; m <= 12;m++){
      date_list.push(y+'-'+m);
    }
  }
  for(var m=1; m <= 1 + today.getMonth();m++){
    date_list.push((1900+today.getYear())+'-'+m);
  }
  console.log(date_list.length)

  // 指定图表的配置项和数据
  var option = {
    title: {
      text: '收益时间分布'
    },
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'cross',
        crossStyle: {
          color: '#999'
        }
      }
    },
    toolbox: {
      feature: {
        dataView: {show: true, readOnly: false},
        magicType: {show: true, type: ['line', 'bar']},
        restore: {show: true},
        saveAsImage: {show: true}
      }
    },
    legend: {
      data:['最高价收益','收盘价收益','出现频次']
    },
    xAxis: [
      {
        type: 'category',
        data: date_list,
        axisPointer: {
          type: 'shadow'
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        name: '收益',
      },
      {
        type: 'value',
        name: '频次',
      }
    ],
    series: [
      {
        name:'最高价收益',
        type:'line',
        data:[0, 1.147, 2.137, 3.227, 3.368, 1.273, 1.71, 8.22, 2.344, 5.986, 4.27, 4.494, 1.409, 5.634, 1.849, 0.141, 3.046, 9.66, 4.393, 4.31, 3.139, 3.51, 2.919, 3.642, 4.315, 2.338, 4.034, 4.633, 4.385, 3.057, 3.053, 3.653, 2.435, 0.186, 2.756, 4.408, 3.032, 3.96, 4.281, 4.202, 5.358, 3.116, -0.092, 3.49, 10.076, 3.95, 4.267, 2.991, 5.644, 0.978, 4.088, 0.737, 4.441, 3.066, 4.135, 2.94, 1.853, 4.623, 4.391, 5.004, 4.416, 3.693, 1.925, 2.877, 4.585]
      },
      {
        name:'收盘价收益',
        type:'line',
        data:[0, 0.34, -0.733, -2.13, 1.712, -1.967, -0.59, 7.833, -3.374, 3.094, -0.893, 0.948, -2.136, 1.858, -2.963, -5.258, -0.009, 8.59, 0.945, 0.895, -0.558, -0.251, 0.132, -0.578, 0.448, -1.313, -0.951, 0.908, 2.698, 0.591, -0.629, -0.074, -0.235, -3.304, -0.512, -0.577, -0.785, -0.528, 0.797, 0.312, 1.122, -1.022, -9.56, -2.359, 10.08, 1.369, -0.229, -1.213, 2.835, -3.12, -1.54, -3.2, 0.559, -0.59, 0.154, -1.053, -1.786, 1.379, -0.043, 0.305, 1.196, -0.166, -1.871, -1.126, -0.533]

      },
      {
        name:'出现频次',
        type:'bar',
        yAxisIndex: 1,
        data:[0, 2, 7, 8, 5, 3, 3, 4, 5, 8, 3, 6, 17, 6, 10, 4, 12, 1, 18, 24, 32, 25, 21, 15, 18, 23, 15, 5, 4, 17, 27, 28, 31, 16, 20, 31, 11, 14, 97, 118, 210, 155, 1, 9, 1, 9, 65, 32, 2, 1, 1, 6, 10, 21, 17, 7, 7, 10, 28, 10, 8, 8, 10, 25, 7]
      }
    ]
  };

  // 使用刚指定的配置项和数据显示图表。
  myChart.setOption(option);
}
function draw_ohlc(){
  // 基于准备好的dom，初始化echarts实例
  var myChart = echarts.init(document.getElementById('chart1'));
  var slist = [];
  /*slist = data.split('\n');*/
  var date_list = [];
  var today = new Date();
  for(var y=2012;y < 1900 + today.getYear();y++){
    for(var m=1; m <= 12;m++){
      date_list.push(y+'-'+m);
    }
  }
  for(var m=1; m <= 1 + today.getMonth();m++){
    date_list.push((1900+today.getYear())+'-'+m);
  }
  console.log(date_list.length)

  // 指定图表的配置项和数据
  var option = {
    title: {
      text: '开高低收时间分布'
    },
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'cross',
        crossStyle: {
          color: '#999'
        }
      }
    },
    toolbox: {
      feature: {
        dataView: {show: true, readOnly: false},
        magicType: {show: true, type: ['line', 'bar']},
        restore: {show: true},
        saveAsImage: {show: true}
      }
    },
    legend: {
      data:['开盘','最高','最低','收盘']
    },
    xAxis: [
      {
        type: 'category',
        data: date_list,
        axisPointer: {
          type: 'shadow'
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        name: '收益',
      }
    ],
    series: [
      {
        name:'开盘',
        type:'line',
        data:[0, -0.075, -1.359, -1.601, -0.844, -2.02, -2.557, -1.045, -2.6, -2.47, -1.433, 0.127, -1.842, -1.41, -2.837, -0.572, -1.206, -1.47, -0.678, -2.016, -2.558, -1.295, -2.046, -1.403, -0.74, -0.838, -0.419, -1.404, -2.917, -0.636, -1.726, -1.169, -1.565, -1.624, -1.321, -1.08, -1.431, -0.375, -1.107, -1.261, -1.446, -1.108, -7.35, -2.783, -1.62, -2.464, -1.338, -1.577, 1.51, -6.3, -2.0, -1.287, -0.849, -0.724, -0.736, -1.893, -1.963, -1.184, -1.264, -3.374, -2.411, -2.006, -1.985, -3.09, -1.681]

      },
      {
        name:'最高',
        type:'line',
        data:[0, 1.147, 2.137, 3.227, 3.368, 1.273, 1.71, 8.22, 2.344, 5.986, 4.27, 4.494, 1.409, 5.634, 1.849, 0.141, 3.046, 9.66, 4.393, 4.31, 3.139, 3.51, 2.919, 3.642, 4.315, 2.338, 4.034, 4.633, 4.385, 3.057, 3.053, 3.653, 2.435, 0.186, 2.756, 4.408, 3.032, 3.96, 4.281, 4.202, 5.358, 3.116, -0.092, 3.49, 10.076, 3.95, 4.267, 2.991, 5.644, 0.978, 4.088, 0.737, 4.441, 3.066, 4.135, 2.94, 1.853, 4.623, 4.391, 5.004, 4.416, 3.693, 1.925, 2.877, 4.585]
      },
      {
        name:'最低',
        type:'line',
        data:[0, -1.785, -3.947, -6.607, -3.994, -4.4, -4.627, -1.913, -5.802, -5.816, -5.8, -3.37, -5.249, -3.745, -6.657, -6.848, -3.531, -1.67, -3.717, -3.909, -5.612, -4.54, -5.209, -5.154, -3.632, -4.846, -5.389, -3.036, -4.965, -3.134, -5.114, -4.081, -3.833, -5.332, -4.62, -5.775, -3.72, -4.916, -4.565, -5.234, -5.514, -6.827, -9.93, -6.368, -3.28, -6.039, -5.034, -4.646, -0.9, -10.0, -8.09, -4.52, -3.869, -4.208, -3.806, -5.343, -5.199, -2.669, -4.49, -6.718, -5.29, -6.09, -4.836, -6.52, -5.313]
      },
      {
        name:'收盘',
        type:'line',
        data:[0, 0.34, -0.733, -2.13, 1.712, -1.967, -0.59, 7.833, -3.374, 3.094, -0.893, 0.948, -2.136, 1.858, -2.963, -5.258, -0.009, 8.59, 0.945, 0.895, -0.558, -0.251, 0.132, -0.578, 0.448, -1.313, -0.951, 0.908, 2.698, 0.591, -0.629, -0.074, -0.235, -3.304, -0.512, -0.577, -0.785, -0.528, 0.797, 0.312, 1.122, -1.022, -9.56, -2.359, 10.08, 1.369, -0.229, -1.213, 2.835, -3.12, -1.54, -3.2, 0.559, -0.59, 0.154, -1.053, -1.786, 1.379, -0.043, 0.305, 1.196, -0.166, -1.871, -1.126, -0.533]

      }
    ]
  };

  // 使用刚指定的配置项和数据显示图表。
  myChart.setOption(option);
}

function draw_succ_rates(){
  // 基于准备好的dom，初始化echarts实例
  var myChart = echarts.init(document.getElementById('chart2'));
  var slist = [];
  /*slist = data.split('\n');*/
  var date_list = [];
  var today = new Date();
  for(var y=2012;y < 1900 + today.getYear();y++){
    for(var m=1; m <= 12;m++){
      date_list.push(y+'-'+m);
    }
  }
  for(var m=1; m <= 1 + today.getMonth();m++){
    date_list.push((1900+today.getYear())+'-'+m);
  }
  console.log(date_list.length)

  // 指定图表的配置项和数据
  var option = {
    title: {
      text: '成功率分布'
    },
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'cross',
        crossStyle: {
          color: '#999'
        }
      }
    },
    toolbox: {
      feature: {
        dataView: {show: true, readOnly: false},
        magicType: {show: true, type: ['line', 'bar']},
        restore: {show: true},
        saveAsImage: {show: true}
      }
    },
    legend: {
      data:['%5成功率','%3成功率','出现频次']
    },
    xAxis: [
      {
        type: 'category',
        data: date_list,
        axisPointer: {
          type: 'shadow'
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        name: '成功率',
      },
      {
        type: 'value',
        name: '频次',
      }
    ],
    series: [
      {
        name:'%5成功率',
        type:'line',
        data:[0, 0.0, 28.571, 37.5, 20.0, 0.0, 0.0, 75.0, 20.0, 62.5, 33.333, 33.333, 23.529, 66.667, 20.0, 0.0, 16.667, 100.0, 38.889, 45.833, 31.25, 36.0, 28.571, 33.333, 33.333, 21.739, 40.0, 60.0, 50.0, 29.412, 29.63, 42.857, 22.581, 6.25, 25.0, 38.71, 36.364, 42.857, 44.33, 40.678, 52.381, 29.032, 0.0, 44.444, 100.0, 55.556, 40.0, 37.5, 50.0, 0.0, 0.0, 0.0, 40.0, 28.571, 41.176, 42.857, 28.571, 40.0, 39.286, 60.0, 37.5, 50.0, 30.0, 40.0, 42.857]
      },
      {
        name:'%3成功率',
        type:'line',
        data:[0, 0.0, 42.857, 50.0, 40.0, 0.0, 66.667, 75.0, 20.0, 62.5, 66.667, 33.333, 29.412, 66.667, 30.0, 0.0, 33.333, 100.0, 61.111, 58.333, 50.0, 52.0, 33.333, 33.333, 61.111, 30.435, 46.667, 60.0, 50.0, 35.294, 40.741, 50.0, 29.032, 12.5, 40.0, 61.29, 45.455, 42.857, 56.701, 54.237, 67.619, 43.871, 0.0, 44.444, 100.0, 55.556, 56.923, 53.125, 50.0, 0.0, 100.0, 16.667, 60.0, 38.095, 52.941, 42.857, 42.857, 70.0, 60.714, 70.0, 50.0, 50.0, 30.0, 52.0, 57.143]

      },
      {
        name:'出现频次',
        type:'bar',
        yAxisIndex: 1,
        data:[0, 2, 7, 8, 5, 3, 3, 4, 5, 8, 3, 6, 17, 6, 10, 4, 12, 1, 18, 24, 32, 25, 21, 15, 18, 23, 15, 5, 4, 17, 27, 28, 31, 16, 20, 31, 11, 14, 97, 118, 210, 155, 1, 9, 1, 9, 65, 32, 2, 1, 1, 6, 10, 21, 17, 7, 7, 10, 28, 10, 8, 8, 10, 25, 7]
      }
    ]
  };

  // 使用刚指定的配置项和数据显示图表。
  myChart.setOption(option);
}

function draw_succ_rates_iver_anthony(){
  // 基于准备好的dom，初始化echarts实例
  var myChart = echarts.init(document.getElementById('chart3'));
  var slist = [];
  /*slist = data.split('\n');*/
  var date_list = [];
  var today = new Date();
  for(var y=2012;y < 1900 + today.getYear();y++){
    for(var m=1; m <= 12;m++){
      date_list.push(y+'-'+m);
    }
  }
  for(var m=1; m <= 1 + today.getMonth();m++){
    date_list.push((1900+today.getYear())+'-'+m);
  }
  console.log(date_list.length)

  // 指定图表的配置项和数据
  var option = {
    title: {
      text: '成功率分布 Iverson&Anthony'
    },
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'cross',
        crossStyle: {
          color: '#999'
        }
      }
    },
    toolbox: {
      feature: {
        dataView: {show: true, readOnly: false},
        magicType: {show: true, type: ['line', 'bar']},
        restore: {show: true},
        saveAsImage: {show: true}
      }
    },
    legend: {
      data:['Iverson%5成功率','Anthony%5成功率','Iverson出现频次','Anthony出现频次']
    },
    xAxis: [
      {
        type: 'category',
        data: date_list,
        axisPointer: {
          type: 'shadow'
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        name: '成功率',
      },
      {
        type: 'value',
        name: '频次',
      }
    ],
    series: [
      {
        name:'Iverson%5成功率',
        type:'line',
        data:[0, 0.0, 28.571, 37.5, 20.0, 0.0, 0.0, 75.0, 20.0, 62.5, 33.333, 33.333, 23.529, 66.667, 20.0, 0.0, 16.667, 100.0, 38.889, 45.833, 31.25, 36.0, 28.571, 33.333, 33.333, 21.739, 40.0, 60.0, 50.0, 29.412, 29.63, 42.857, 22.581, 6.25, 25.0, 38.71, 36.364, 42.857, 44.33, 40.678, 52.381, 29.032, 0.0, 44.444, 100.0, 55.556, 40.0, 37.5, 50.0, 0.0, 0.0, 0.0, 40.0, 28.571, 41.176, 42.857, 28.571, 40.0, 39.286, 60.0, 37.5, 50.0, 30.0, 40.0, 42.857]
      },
      {
        name:'Anthony%5成功率',
        type:'line',
        data: [33.333, 20.0, 0.0, 58.333, 0.0, 25.0, 71.429, 30.769, 0.0, 60.0, 0.0, 18.182, 11.111, 16.667, 0.0, 50.0, 18.182, 66.667, 64.286, 25.0, 14.286, 42.857, 50.0, 36.364, 28.571, 41.176, 8.333, 37.5, 37.5, 30.0, 30.0, 22.222, 28.571, 57.143, 63.636, 44.828, 41.667, 33.333, 35.714, 38.0, 44.286, 22.368, 0, 35.065, 44.444, 48.889, 46.667, 30.0, 80.0, 40.909, 41.176, 27.273, 57.143, 10.0, 12.5, 30.769, 42.857, 33.333, 46.154, 0.0, 40.0, 20.0, 50.0, 33.333, 25.0]

      },
      {
        name:'Iverson出现频次',
        type:'bar',
        yAxisIndex: 1,
        data:[0, 2, 7, 8, 5, 3, 3, 4, 5, 8, 3, 6, 17, 6, 10, 4, 12, 1, 18, 24, 32, 25, 21, 15, 18, 23, 15, 5, 4, 17, 27, 28, 31, 16, 20, 31, 11, 14, 97, 118, 210, 155, 1, 9, 1, 9, 65, 32, 2, 1, 1, 6, 10, 21, 17, 7, 7, 10, 28, 10, 8, 8, 10, 25, 7]
      },
      {
        name:'Anthony出现频次',
        type:'bar',
        yAxisIndex: 1,
        data:[3, 5, 4, 12, 5, 4, 7, 13, 2, 5, 4, 11, 9, 6, 3, 2, 11, 3, 14, 8, 14, 14, 10, 11, 7, 17, 12, 8, 8, 10, 10, 9, 7, 7, 11, 29, 12, 12, 28, 50, 70, 76, 0, 77, 63, 45, 30, 30, 15, 22, 17, 11, 7, 20, 8, 13, 7, 3, 13, 10, 5, 5, 8, 6, 4]
      }
    ]
  };

  // 使用刚指定的配置项和数据显示图表。
  myChart.setOption(option);
}

function draw_iverson_scatter(){
  // 基于准备好的dom，初始化echarts实例
  var myChart = echarts.init(document.getElementById('chart4'));
  data = [[  1.0 , 1.0 , -0.122160163314  ],
    [  1.0 , 0.99 , -0.0443566090659  ],
    [  1.0 , 0.98 , -0.0573149036809  ],
    [  1.0 , 0.97 , 0.0592849283083  ],
    [  1.0 , 0.96 , 0.0793895390726  ],
    [  1.0 , 0.95 , 0.235955103756  ],
    [  1.0 , 0.94 , 0.223139511143  ],
    [  1.0 , 0.93 , 0.250216362476  ],
    [  1.0 , 0.92 , 0.374208876655  ],
    [  1.0 , 0.91 , 0.459338778254  ],
    [  1.0 , 0.9 , 0.585568750082  ],
    [  1.01 , 1.0 , -0.134514292139  ],
    [  1.01 , 0.99 , -0.0578580068025  ],
    [  1.01 , 0.98 , -0.0597241827177  ],
    [  1.01 , 0.97 , 0.156098159279  ],
    [  1.01 , 0.96 , 0.224091455792  ],
    [  1.01 , 0.95 , 0.335380751733  ],
    [  1.01 , 0.94 , 0.313736889673  ],
    [  1.01 , 0.93 , 0.340813741006  ],
    [  1.01 , 0.92 , 0.464806255185  ],
    [  1.01 , 0.91 , 0.571616566224  ],
    [  1.01 , 0.9 , 0.699267775875  ],
    [  1.02 , 1.0 , 0.00505285356364  ],
    [  1.02 , 0.99 , 0.0735974374003  ],
    [  1.02 , 0.98 , 0.0772172457142  ],
    [  1.02 , 0.97 , 0.223258107229  ],
    [  1.02 , 0.96 , 0.225615611676  ],
    [  1.02 , 0.95 , 0.477201206193  ],
    [  1.02 , 0.94 , 0.457330099814  ],
    [  1.02 , 0.93 , 0.484406951147  ],
    [  1.02 , 0.92 , 0.617578370533  ],
    [  1.02 , 0.91 , 0.724388681572  ],
    [  1.02 , 0.9 , 0.853973715467  ],
    [  1.03 , 1.0 , -0.0162923891268  ],
    [  1.03 , 0.99 , 0.0535032009738  ],
    [  1.03 , 0.98 , 0.118637444183  ],
    [  1.03 , 0.97 , 0.263129645443  ],
    [  1.03 , 0.96 , 0.286218033246  ],
    [  1.03 , 0.95 , 0.543716224424  ],
    [  1.03 , 0.94 , 0.522870197391  ],
    [  1.03 , 0.93 , 0.549947048724  ],
    [  1.03 , 0.92 , 0.690628481461  ],
    [  1.03 , 0.91 , 0.719602568446  ],
    [  1.03 , 0.9 , 0.849127018631  ],
    [  1.04 , 1.0 , -0.172030121731  ],
    [  1.04 , 0.99 , 0.0234810268934  ],
    [  1.04 , 0.98 , 0.153335885231  ],
    [  1.04 , 0.97 , 0.124416079285  ],
    [  1.04 , 0.96 , 0.12423881565  ],
    [  1.04 , 0.95 , 0.374171066013  ],
    [  1.04 , 0.94 , 0.353109277799  ],
    [  1.04 , 0.93 , 0.380186129132  ],
    [  1.04 , 0.92 , 0.520867561869  ],
    [  1.04 , 0.91 , 0.609086003872  ],
    [  1.04 , 0.9 , 0.737211510202  ],
    [  1.05 , 1.0 , -0.0986425400759  ],
    [  1.05 , 0.99 , 0.0504182287853  ],
    [  1.05 , 0.98 , 0.186911430193  ],
    [  1.05 , 0.97 , 0.182420531418  ],
    [  1.05 , 0.96 , 0.182243267782  ],
    [  1.05 , 0.95 , 0.399557688971  ],
    [  1.05 , 0.94 , 0.378813233545  ],
    [  1.05 , 0.93 , 0.405890084877  ],
    [  1.05 , 0.92 , 0.546571517615  ],
    [  1.05 , 0.91 , 0.634789959618  ],
    [  1.05 , 0.9 , 0.763240832476  ],
    [  1.06 , 1.0 , 0.0372143301271  ],
    [  1.06 , 0.99 , 0.127278190664  ],
    [  1.06 , 0.98 , 0.253399460364  ],
    [  1.06 , 0.97 , 0.314217957952  ],
    [  1.06 , 0.96 , 0.247104154327  ],
    [  1.06 , 0.95 , 0.469567289026  ],
    [  1.06 , 0.94 , 0.449446443025  ],
    [  1.06 , 0.93 , 0.476866039311  ],
    [  1.06 , 0.92 , 0.619328249678  ],
    [  1.06 , 0.91 , 0.708663380821  ],
    [  1.06 , 0.9 , 0.839708154885  ],
    [  1.07 , 1.0 , 0.0863884586894  ],
    [  1.07 , 0.99 , 0.182504223632  ],
    [  1.07 , 0.98 , 0.308625493331  ],
    [  1.07 , 0.97 , 0.387477776241  ],
    [  1.07 , 0.96 , 0.320363972616  ],
    [  1.07 , 0.95 , 0.545574350501  ],
    [  1.07 , 0.94 , 0.526415619202  ],
    [  1.07 , 0.93 , 0.553835215488  ],
    [  1.07 , 0.92 , 0.696297425855  ],
    [  1.07 , 0.91 , 0.785632556998  ],
    [  1.07 , 0.9 , 0.917664115372  ],
    [  1.08 , 1.0 , 0.0982114691663  ],
    [  1.08 , 0.99 , 0.182130818794  ],
    [  1.08 , 0.98 , 0.308252088494  ],
    [  1.08 , 0.97 , 0.347591753096  ],
    [  1.08 , 0.96 , 0.280477949471  ],
    [  1.08 , 0.95 , 0.504192601488  ],
    [  1.08 , 0.94 , 0.484510050582  ],
    [  1.08 , 0.93 , 0.511929646868  ],
    [  1.08 , 0.92 , 0.654391857235  ],
    [  1.08 , 0.91 , 0.743726988377  ],
    [  1.08 , 0.9 , 0.875221295872  ],
    [  1.09 , 1.0 , 0.00644935172619  ],
    [  1.09 , 0.99 , 0.0181499872826  ],
    [  1.09 , 0.98 , 0.122116098716  ],
    [  1.09 , 0.97 , 0.154508950165  ],
    [  1.09 , 0.96 , 0.0857380155858  ],
    [  1.09 , 0.95 , 0.307698943275  ],
    [  1.09 , 0.94 , 0.284953291589  ],
    [  1.09 , 0.93 , 0.313085085181  ],
    [  1.09 , 0.92 , 0.4592476127  ],
    [  1.09 , 0.91 , 0.550903136859  ],
    [  1.09 , 0.9 , 0.683320664926  ],
    [  1.1 , 1.0 , -0.250879612935  ],
    [  1.1 , 0.99 , -0.23888646149  ],
    [  1.1 , 0.98 , -0.132321197271  ],
    [  1.1 , 0.97 , -0.102328998898  ],
    [  1.1 , 0.96 , -0.172840969796  ],
    [  1.1 , 0.95 , 0.0447539697248  ],
    [  1.1 , 0.94 , 0.0178958343465  ],
    [  1.1 , 0.93 , 0.0467778091011  ],
    [  1.1 , 0.92 , 0.196838004021  ],
    [  1.1 , 0.91 , 0.290937675491  ],
    [  1.1 , 0.9 , 0.423421008892  ]]

    // 指定图表的配置项和数据
    var option = {
      title: {
        text: 'Iverson 止盈止损策略',
        textStyle: {
          fontWeight: 'normal',              //标题颜色
          color: '#ffffbf'
        }
      },
      backgroundColor: '#464547',
      visualMap: {
        show: false,
        min: -0.3,
        max: 1.0,
        inRange: {
          symbolSize: [14, 15],
          color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026'],
          colorAlpha: [0.9, 1]
        }
      },
      xAxis3D: {
        type: 'value',
        min:1.0,
        max:1.1
      },
      yAxis3D: {
        type: 'value',
        min:0.9,
        max:1.0
      },
      zAxis3D: {
        type: 'value'
      },
      grid3D: {
        axisLine: {
          lineStyle: { color: '#fff' }
        },
        axisPointer: {
          lineStyle: { color: '#fff' }
        },
        viewControl: {
          // autoRotate: true
        }
      },
      series: [{
        type: 'scatter3D',
        data: data
      }]
    };
    myChart.setOption(option);
}
window.onload = init();
function init(){
  /*res_load('iver_af2012');*/
  draw_bene_freq();
  draw_ohlc();
  draw_succ_rates();
  draw_succ_rates_iver_anthony();
  draw_iverson_scatter();
}

